//
//  HomeCell.m
//  南京大牌档
//
//  Created by student on 13-12-25.
//  Copyright (c) 2013年 无锡第三团队. All rights reserved.
//

#import "HomeCell.h"

@implementation HomeCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initSubviews];
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)initSubviews
{
    homeImage=[[UIImageView alloc]initWithFrame:CGRectZero];
    homeImage.backgroundColor=[UIColor redColor];
    [self.contentView addSubview:homeImage];
    
    homeLargeLabel=[[UILabel alloc]initWithFrame:CGRectZero];
    homeLargeLabel.backgroundColor=[UIColor clearColor];
    homeLargeLabel.font=[UIFont boldSystemFontOfSize:16];
    [self.contentView addSubview:homeLargeLabel];
    
    homeSmallLabel=[[UILabel alloc]initWithFrame:CGRectZero];
    homeSmallLabel.backgroundColor=[UIColor clearColor];
    homeSmallLabel.font=[UIFont boldSystemFontOfSize:10];
    [self.contentView addSubview:homeSmallLabel];
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    homeImage.frame=CGRectMake(9, 6, ((WXHLApplicationBounds().size.height-140-49-44-20)/4-12)/3*4, (WXHLApplicationBounds().size.height-140-49-44-20)/4-12);
    homeLargeLabel.frame=CGRectMake(homeImage.frame.size.width+20, 6, 100, homeImage.frame.size.height/5*2);
    homeLargeLabel.text=self.largetext;
    homeSmallLabel.frame=CGRectMake(homeImage.frame.size.width+20, homeImage.frame.size.height/5*4, 200, homeImage.frame.size.height/5*2);
    homeSmallLabel.text=self.smalltext;
    homeImage.image=[UIImage imageNamed:_img];
}
@end
